package lab02.test27;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created by 婷婷 on 2017/11/13.
 */
public class Test27 {
    public static void main(String[] args) {
        System.out.println("请从键盘输入一个整数！");
        try {
            Scanner num = new Scanner(System.in);
            int number  = num.nextInt();
            System.out.println(+number);

        }catch (InputMismatchException e){
            System.out.println("捕捉到异常：你输入了一个非整形的值");
        }
    }
}
